package com.light.view;

import atlantafx.base.theme.Styles;
import com.light.util.FxApplicationContextUtils;
import javafx.collections.ListChangeListener;
import javafx.scene.layout.HBox;
import javafx.scene.text.Text;

public class NotificationView extends Text {
    public NotificationView() {
        super(FxApplicationContextUtils.HISTORY_NOTICE_LIST.size() + "");
        getStyleClass().addAll(Styles.TEXT, Styles.WARNING);
        FxApplicationContextUtils.HISTORY_NOTICE_LIST.addListener((ListChangeListener<HBox>) c -> setText(FxApplicationContextUtils.HISTORY_NOTICE_LIST.size() + ""));
    }
}
